package F02;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class Test3FileOutStream {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos=new FileOutputStream("1.txt",true);//后面加true可以追加写入
        for (int i = 0; i < 10; i++) {
            fos.write("hello".getBytes(StandardCharsets.UTF_8));
            fos.write("\r\n".getBytes(StandardCharsets.UTF_8));
        }



    }
}
